package com.gz.logistics.util;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by Administrator on 2016-05-05.
 */
public class ShareUtil {
    public static void setstringvalue(Context context,String key,String value){
        SharedPreferences settings = context.getSharedPreferences("Clothes_category", 0);
        SharedPreferences.Editor editor =settings.edit();
        editor.putString(key, value);
        editor.commit();
    }

    public static String getstringvalue(Context context,String key){
        SharedPreferences settings = context.getSharedPreferences("Clothes_category", 0);
        String name = settings.getString(key,"-1");
        return name;
    }
    public static void setColorvalue(Context context,String key,String value){
        SharedPreferences settings = context.getSharedPreferences("Clothes_color", 0);
        SharedPreferences.Editor editor =settings.edit();
        editor.putString(key, value);
        editor.commit();
    }

    public static String getColorvalue(Context context,String key){
        SharedPreferences settings = context.getSharedPreferences("Clothes_color", 0);
        String name = settings.getString(key,"-1");
        return name;
    }
    public static void setbugvalue(Context context,String key,String value){
        SharedPreferences settings = context.getSharedPreferences("Clothes_category", 0);
        SharedPreferences.Editor editor =settings.edit();
        editor.putString(key, value);
        editor.commit();
    }

    public static String getbugvalue(Context context,String key){
        SharedPreferences settings = context.getSharedPreferences("Clothes_category", 0);
        String name = settings.getString(key,"-1");
        return name;
    }
}
